<!DOCTYPE html>

<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>box-sizing</title>

    <style type="text/css">
        .wrapper {
            border: 1px solid blue;
            width: 600px;
            height: 400px;
            margin: 5vh auto;
        }
        
        .first>div {
            box-sizing: content-box;
            width: 300px;
            height: 200px;
            background: #6666fa;
            background-clip: content-box;
            padding: 20px;
            border: 20px dotted purple;
            margin: 60px auto;
        }
        
        .second>div {
            box-sizing: border-box;
            width: 300px;
            height: 200px;
            background: #6666fa;
            background-clip: content-box;
            padding: 20px;
            border: 20px dotted purple;
            margin: 60px auto;
        }
        
        .third {
            overflow: hidden;
        }
        
        .third>div {
            float: left;
            box-sizing: border-box;
            width: 20%;
            height: 100px;
            border-right: 1px solid gold;
        }
        
        .third>div:nth-child(odd) {
            background: #6666fa;
        }
        
        .third>div:nth-child(even) {
            background: #fa6666;
        }
        
        .third>div:last-child {
            border-right: none;
        }
    </style>


</head>

<body>

    <div class="wrapper first">
        <div></div>
    </div>

    <div class="wrapper second">
        <div></div>
    </div>

    <div class="wrapper third">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>

</body>

</html>